<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let person1={name:'jack',age:'19',sex:'男'};
    let person2={...person1};//复制对象
    // console.log(...person1);//报错，不可以直接展开对象
    person1.name='tom';
    console.log(person1);
    console.log(person2);
    let person3={...person1,name:'curry',height:'190'}//合并对象
    console.log(person3);
  </script>
</body>
</html>